package com.max.file;

import org.apache.http.client.HttpClient;

import java.nio.channels.FileChannel;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Semaphore;

/**
 * Created by Maxwell Yu on 4/22/17.
 */
public class FileMetadata {
    private FileChannel resultFile;

    private String fileUrl;

    private ExecutorService pool;

    private int totalThreads;

    private Semaphore freeThreads;

    private Long BufferSize = (long) 2 * 1024 * 1024;

    private String FileName;

    private long fileSize;

    private String location;

    private boolean isFileExist = false;

    private String MD5;

    private HttpClient httpClient;

    public FileChannel getResultFile() {
        return resultFile;
    }

    public void setResultFile(FileChannel resultFile) {
        this.resultFile = resultFile;
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public ExecutorService getPool() {
        return pool;
    }

    public void setPool(ExecutorService pool) {
        this.pool = pool;
    }

    public int getTotalThreads() {
        return totalThreads;
    }

    public void setTotalThreads(int totalThreads) {
        this.totalThreads = totalThreads;
    }

    public Semaphore getFreeThreads() {
        return freeThreads;
    }

    public void setFreeThreads(Semaphore freeThreads) {
        this.freeThreads = freeThreads;
    }

    public Long getBufferSize() {
        return BufferSize;
    }

    public String getFileName() {
        return FileName;
    }

    public void setFileName(String fileName) {
        FileName = fileName;
    }

    public long getFileSize() {
        return fileSize;
    }

    public void setFileSize(long fileSize) {
        this.fileSize = fileSize;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public boolean isFileExist() {
        return isFileExist;
    }

    public void setFileExist(boolean fileExist) {
        isFileExist = fileExist;
    }

    public String getMD5() {
        return MD5;
    }

    public void setMD5(String MD5) {
        this.MD5 = MD5;
    }

    public HttpClient getHttpClient() {
        return httpClient;
    }

    public void setHttpClient(HttpClient httpClient) {
        this.httpClient = httpClient;
    }

}
